package com.partner.boot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
* <p>
* 
* </p>
*
* @author 小熊
* @since 2023-03-23
*/
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Message对象", description = "")
public class Message implements Serializable {

private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    // 发送者
    @ApiModelProperty("发送者")
    @Alias("发送者")
    private Integer fromId;

    // 接受者
    @ApiModelProperty("接受者")
    @Alias("接受者")
    private Integer toId;

    // 类型
    @ApiModelProperty("类型")
    @Alias("类型")
    private Integer type;

    // 发送内容
    @ApiModelProperty("发送内容")
    @Alias("发送内容")
    private String contents;

    // 发送时间
    @ApiModelProperty("发送时间")
    @Alias("发送时间")
    private LocalDateTime time;

    @TableField(exist = false)
    private User user;

}